#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>

using namespace std;

class Solution {
public:
    bool isUnique(string nums) {
        if (nums.size() > 26) return false;
        int bit = 0;
        for (auto& ch : nums)
        {
            if (!((bit >> (ch - 97)) & 1))
            {
                bit |= (1 << (ch - 97));
            }
            else
            {
                return false;
            }
        }
        return true;
    }
};